import { ProjectMemberModel } from './member';
import { EventModel, EventPageModel } from './event';

class ProjectModel {
  public name: string;
  public avatarLink: string;
  public maxMemberCount: number;
  public maxStorageSize: number;
  public accountId: string;
  public active: boolean;
  public clientId: string;
  public createAt: number;
  public id: string;
  public owner: string;
  public projectId: string;
  public thumbnail: string;
  public updateAt: number;
  public userData: string;
  public cycle: string;
  public address: string;
  public size: string;
  public type: string;
  public province: string;
  public city: string;
  public district: string;
}

class QuotaModel {
  public id: string;
  public memberCount: number;
  public storageSize: number;
  public sfsSize: number;
  public projectAdmins: SimpleUserModel[];
}

class SimpleUserModel {
  public username: string;
  public email: string;
  public realName: string;
}

class ActivityModel extends EventModel {
}

class ActivityPageModel extends EventPageModel {
}

class ProjectPageModel {
  public count: number;
  public data: {
    count: number
    items: ProjectModel[]
  };
  public first: boolean;
  public hasNext: boolean;
  public hasPrevious: boolean;
  public last: boolean;
  public pageNumber: number;
  public pageSize: number;
  public totalPage: number;
  public totalElements: number;
}

class GroupModel {
  public createAt: number;
  public id: string;
  public memberModels: ProjectMemberModel[];
  public name: string;
  public parentId: string;
  public projectId: string;
  public upDateAt: string;
  public userData: string;

  public order: number;
  public tag: number;
}

class ItemGroup {
  public count: number;
  public items: GroupModel[];
}

class AccountItemGroup {
  accountMemberGroups: GroupModel[];
}

export {
  ProjectModel,
  ActivityModel,
  ActivityPageModel,
  ProjectPageModel,
  QuotaModel,
  GroupModel,
  ItemGroup,
  AccountItemGroup
};
